﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using EWineShop.Service.Model;
using EWineShop.Service.Contracts;
using EWineShop.Service;

namespace EWineShop.AdminSite.Controllers
{
    public class FoodInfoController : Controller
    {

        IIDCreaterService IIDCreater = new IDCreaterService();

        IFoodAttributeService IFoodAttribute = new FoodAttributeService(); //属性
        IFoodPracticeService IFoodPractice = new FoodPracticeService(); //做法
        IFoodUnitService IFoodUnit = new FoodUnitService(); //单位
        IFoodCategoryService IFoodCategory = new FoodCategoryService(); //类别
        IFoodDepartmentService IFoodDepartment = new FoodDepartmentService(); //目录
        IFoodTasteService IFoodTaste = new FoodTasteService(); //口味


        public ActionResult Index()
        {
            return View();
        }

        public ActionResult Add()
        {
            
            ViewData["FoodPractice"] = IFoodPractice.GetAll();
            ViewData["FoodAttribute"] = IFoodAttribute.GetAll();
            ViewData["FoodUnit"] = IFoodUnit.GetAll();
            ViewData["FoodCategory"] = IFoodCategory.GetAll();
            ViewData["FoodDepartment"] = IFoodDepartment.GetAll();
            ViewData["FoodTaste"] = IFoodTaste.GetAll();

            return View();

        }

        public ActionResult Save(FormCollection collection)
        {
            FoodInfoModel model = new FoodInfoModel();

            return null;
        }
    }
}
